<script setup lang="ts">
import { inject } from 'vue'

// 通过 inject 接收并使用 Provide 注入的值
const count = inject('count')
const updateCount = inject('updateCount') as (num: number) => void
const change = () => {
  updateCount(100)
}
</script>

<template>
  <div class="child-page" style="padding: 50px; border: 10px solid #ccc">
    child 组件 count:{{ count }} <button @click="change">修改count</button>
  </div>
</template>
